﻿Public Class FrmMainForm

    Private Sub ButtonItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem15.Click
        Dim f As New frmTheLoai
        ShowChildForm(Me, f)
    End Sub


    'Private Sub frmMainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    '    Dim f As New Connect
    '    f.ShowDialog()
    '    If Not db.IsConnected Then
    '        MsgBox("Khong the ket noi toi csdl")
    '        Close()
    '    End If

    'End Sub

    Private Sub RibbonPanel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RibbonPanel1.Click

    End Sub

    Private Sub FrmMainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        db = New DbConnect(".\sqlExpress", "QLTV_Nhom4")
        db.connect()
        nv.MaNV = "NV001"
    End Sub

    Private Sub ButtonItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem16.Click
        Dim f As New frmNhaXuatBan
        ShowChildForm(Me, f)

    End Sub

    Private Sub ButtonItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem17.Click
        Dim f As New frmTacGia
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem20.Click
        Dim f As New FrmDangNhap
        ShowChildForm(Me, f)

    End Sub

    Private Sub ButtonItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem21.Click
        Dim f As New frmUuTien
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem1.Click
        Dim f As New frmSach
        ShowChildForm(Me, f)
    End Sub

    'Private Sub FrmMainForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown

    '    Dim f As New FrmDangNhap
    '    f.ShowDialog()


    ' End Sub

    Private Sub ButtonItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem18.Click
        Dim f As New frmNhanVien
        ShowChildForm(Me, f)

    End Sub

    Private Sub RibbonPanel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RibbonPanel2.Click

    End Sub

    Private Sub ButtonItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem19.Click
        Dim f As New frmDocGia
        ShowChildForm(Me, f)

    End Sub

    Private Sub btnDanhSachSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDanhSachSach.Click
        Dim f As New frmChiTietSach
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem23.Click
        Dim f As New frmTimKiem
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem24.Click
        Dim f As New frmPhieuMuon
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem25.Click
        Dim f As New FrmPhieuPhat
        ShowChildForm(Me, f)
    End Sub

    Private Sub ButtonItem26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem26.Click
        'Dim rpt As New  'CrTKPhieuMuonTrongThang
        'rpt.SetDataSource(clsPhieuMuon.PhieuMuonTrongThang(Date.Now.Month))
        'Dim fpmtt As New frmThongKe
        'fpmtt.SetReport("Thống kê phiếu mượn trong tháng", rpt)
        'ShowChildForm(Me, fpmtt)
    End Sub
End Class